var express = require("express");
var router = express.Router();
var complainModel = require("../../models/complain/complain_list");

router.put("/", function (req, res, next) {
  console.log(req.body.order_id);
  let order_id = req.body.order_id;
  complainModel.updateOne({ order_id }, {
    $set: {
      state: 1,
    },
  }, (err) => {
    if (!err) {
      res.json({ msg: "已处理！", code: 200 });
    }
  }
  );
  // res.json({
  //   data: [],
  //   msg: "返回成功！",
  //   code: 200,
  // });
});

module.exports = router;
